package cn.ac.jaas.isc.vegetable.common.data.tenant;

import feign.RequestInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.ClientHttpRequestInterceptor;

/**
 * @author 张高昌
 * @date 2022/4/23 20:06
 * @description: 租户信息拦截
 */
@Configuration
public class VegetableTenantConfiguration {

    @Bean
    public RequestInterceptor vegetableFeignTenantInterceptor() {
        return new VegetableFeignTenantInterceptor();
    }

    @Bean
    public ClientHttpRequestInterceptor vegetableTenantRequestInterceptor() {
        return new TenantRequestInterceptor();
    }
}
